﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using OOS.Application.Cart.Dtos;
using OOS.Core.Cart;

namespace OOS.Application.Cart.Services.Interfaces
{
    /// <summary>
    /// 购物车
    /// </summary>
    public interface IShoppingCartService
    {
        /// <summary>
        /// 新增购物车数据并返回购物车数据id
        /// </summary>
        /// <param name="shoppingCart"></param>
        /// <returns></returns>
        int InsertShoppingCart(ShoppingCart shoppingCart);

        /// <summary>
        /// 根据id查询购物车数据
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        ShoppingCartDto SelectShoppingCartById(int id);

        /// <summary>
        /// 通过token中的用户id获取对应的购物车列表
        /// </summary>
        /// <returns></returns>
        List<ShoppingCartDto> SelectShoppingCartDtosByUserId();

        /// <summary>
        /// 根据id修改对应购物车数据
        /// </summary>
        /// <param name="shoppingCart"></param>
        /// <returns></returns>
        Boolean UpdateShoppingCartById(ShoppingCart shoppingCart);

        /// <summary>
        /// 根据id列表批量删除购物车数据
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        Boolean DeleteShoppingCartByIds(int[] ids);
    }
}
